package com.gzhryc.shared_device.bxscn.code.dao.enums;

public class PortableEnergyBatteryEnum {

	public enum LeaseType {

		SelfService(1, "自助租借"), ShopService(2, "门店租借");

		private Integer index;
		private String note;

		LeaseType(Integer index, String note) {
			this.index = index;
			this.note = note;
		}

		public Integer index() {
			return index;
		}

		public String note() {
			return note;
		}

		public static String note(Integer index) {
			LeaseType[] temp = LeaseType.values();
			for (int i = 0; i < temp.length; i++) {
				LeaseType item = temp[i];
				if (item.index.equals(index)) {
					return item.note();
				}
			}
			return null;
		}
	}

	public enum State {

		Stock(1, "库存"), Charging(2, "充电/待租中"), Lease(3, "租借中"), Lose(4, "丢失"),;

		private Integer index;
		private String note;

		State(Integer index, String note) {
			this.index = index;
			this.note = note;
		}

		public Integer index() {
			return index;
		}

		public String note() {
			return note;
		}

		public static String note(Integer index) {
			State[] temp = State.values();
			for (int i = 0; i < temp.length; i++) {
				State item = temp[i];
				if (item.index.equals(index)) {
					return item.note();
				}
			}
			return null;
		}
	}
}
